import logging
from logging import handlers

logging.basicConfig(level=logging.INFO)

logger = logging.getLogger('eveAuto')
formatter = logging.Formatter('%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s')

stream_handler = logging.StreamHandler()
stream_handler.setLevel(logging.INFO)
stream_handler.setFormatter(formatter)

time_rotating_file_handler = handlers.TimedRotatingFileHandler(filename='working.log', when='D')
time_rotating_file_handler.setLevel(logging.INFO)
time_rotating_file_handler.setFormatter(formatter)

# logger.addHandler(stream_handler)
logger.addHandler(time_rotating_file_handler)


def log(info):
    logger.info(info)